package com.iaz.tech.tools.message;

import java.util.UUID;

import lombok.Data;

@Data
public abstract class NeuronMessage implements IMessageAble {

	private String projectId;
	
	private MESSAGESTATE messageState;
	private int count = 0;

	private long timestamp = System.currentTimeMillis();
	/** 神经元ID */
	private UUID neuronID = null;
	
	@Override
	public String getProjectID() { 
		return this.projectId;
	}
	
	@Override
	public void putState(MESSAGESTATE _state) {
		this.messageState = _state;					// 状态
	}
	
	@Override
	public MESSAGESTATE getState() {
		return this.messageState;
	}
	
	@Override
	public long toTimestamp() {
		return this.timestamp;
	}
	
	@Override
	public UUID toUUID() {
		return this.neuronID;
	}
}
